<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    
    console.log( true ? 1 : 2 );
    console.log( false ? 1 : 2 );

    var a = 4;

    a = a>10 ? a : "0"+a;

    console.log( a );

    if(a>10){
        console.log(a);
    }else{
        console.log("0"+a);
    }

</script>
</html>